﻿using System;
using System.Collections.Generic;
using System.Text;

namespace 设计模式
{

    interface GiveGift
    {

        void GiveDolls();
        void GiveFlowers();
        void GiveChocolate();

    }

    class SchoolGirl
    {
        public string Name;
    }


    class Pursuit : GiveGift
    {
        SchoolGirl mm;
        public Pursuit(SchoolGirl mm)
        {
            this.mm = mm;
        }

        public void GiveDolls()
        {
            Console.WriteLine(mm.Name + " 送你洋娃娃");
        }

        public void GiveFlowers()
        {
            Console.WriteLine(mm.Name + " 送你鲜花");
        }


        public void GiveChocolate()
        {
            Console.WriteLine(mm.Name + " 送你巧克力");
        }

    }

    class Proxy : GiveGift
    {
        Pursuit gg;
        public Proxy(SchoolGirl mm)
        {
            gg = new Pursuit(mm);
        }

        public void GiveDolls()
        {
            gg.GiveDolls();
        }

        public void GiveFlowers()
        {
            gg.GiveFlowers();
        }

        public void GiveChocolate()
        {
            gg.GiveChocolate();
        }
    }

    class Zhuimm
    {
        public static void main()
        {
            SchoolGirl xiaoying = new SchoolGirl();
            xiaoying.Name = "小颖";

            Proxy proxy = new Proxy(xiaoying);

            proxy.GiveChocolate();
            proxy.GiveDolls();
            proxy.GiveFlowers();

            Console.Read();

        }
    }
}
